/**
 * Created with IntelliJ IDEA.
 * User: wenxiwen
 * Date: 2022/3/19
 * Time: 17:37
 * Description: No Description
 */
public class TestDemo1 {
    public class TestDemo {
        public static int add(int x ,int y ) {
            return x+y;
        }
        public static void add(double x ,int y) {
            int a=x+y;
        }
        {
            x+y;
        }
        public static void main(String[] args) {
            add(10,20);
        }
        public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String str = scanner.next();
            String emailMatcher="[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";

            if(str.matches(emailMatcher)) {
                System.out.println("邮箱格式合法");
            } else {
                System.out.println("邮箱格式不合法");
            }


        }
        public static void main1(String[] args) {
            int[][]  arr = {{11,33,55},{22,44,66,88},{131,214,315,146},{928,827,726,625},{424,525}};
            int sum=add(arr);
            System.out.println(sum);
        }

        public static int add(int[][] arr) {
            int sum=0;

            for(int i = 0; i < arr.length;i++) {
                for(int j = 0;j < arr[i].length;j++) {
                    sum += arr[i][j];
                }
            }

            return sum;
        }
        public int[][] findContinuousSequence(int target) {

            int i = 1;
            int j = 1;
            int sum = 0;
            List<int[]> res = new ArrayList<>();

            while(j <= target / 2) {
                if(sum < target) {
                    sum += i;
                    i++;
                }
                else if(sum > target) {
                    sum -= j;
                    j++;
                } else {
                    int[] arr = new int[i - j];
                    for(int k = j; k < i; k++) {
                        arr [k - j] = k;
                    }
                    res.add(arr);
                    sum -= j;
                    j++;
                }
            }
            return res.toArray(new int[res.size()][]);
        }
    }
}